package com.lzc.springboot_jsp_shiro.service.impl;

import com.lzc.springboot_jsp_shiro.dao.RoleDao;
import com.lzc.springboot_jsp_shiro.entity.Role;
import com.lzc.springboot_jsp_shiro.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RoleServiceImpl implements RoleService {
    @Autowired
    private RoleDao roleDao;

    /**
     * 根据用户名获取角色信息
     *
     * @param username
     * @return
     */
    @Override
    public List<Role> findRoleByUsername(String username) {

        return roleDao.findRoleByUsername(username);
    }
}
